﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class SiteMaster : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["username"] != null)
        {
            hWelcome.Style["display"] = "block";
            divLogin.Style["display"] = "none";
        }
        else
        {
            divLogin.Style["display"] = "block";
            hWelcome.Style["display"] = "none";
        }
    }
    protected void btnLogout_Click(object sender, EventArgs e)
    {
        Session["username"] = null;
        string url = "~/Default.aspx";
        Response.Redirect(url);
    }
}
